package main

import (
	"fmt"
	"time"
)

func main() {
	var n int = 1000000000

	// 将纳秒时间戳转换为毫秒
	t1 := time.Now().UnixNano() / 1e6
	fmt.Println("当前时间戳（毫秒）:", t1)

	result := 0
	for i := 0; i <= n; i++ {
		result += 1
	}

	t2 := time.Now().UnixNano() / 1e6
	fmt.Println("用时（毫秒）:", t2-t1)
}
